﻿using MessageWorkflow;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.ObjectModel;
using MessageWorkflow.Handler;

namespace MessageWorkflow.Test
{
   
    [TestClass]
    public class GenericWorkflowHandlerTest : WorkflowHandler<object>
    {
        [TestMethod]
        public void GenericWorkflowHandler_Can_Resolve_Direct_Type_Message()
        {
            Assert.IsTrue(this.CanHandle(typeof(object)));
        }

        [TestMethod]
        public void GenericWorkflowHandler_Can_Resolve_Derived_Type_Message()
        {
            this.HandleDerivedTypes = true;
            Assert.IsTrue(this.CanHandle(typeof(string)));
        }

        protected override IAsyncResult BeginHandleMessage(AsyncCallback callback, object message)
        {
            throw new NotImplementedException();
        }
    }
}
